<!DOCTYPE html>
<html>
<head>
    <meta name="viewport" content="minimum-scale=1.0, width=device-width, maximum-scale=1.0, user-scalable=no"/>
    <meta charset="utf-8">
    <script src="https://unpkg.com/react@16/umd/react.development.js"></script>
    <script src="https://unpkg.com/react-dom@16/umd/react-dom.development.js"></script>
    <script src="https://unpkg.com/babel-standalone@6.15.0/babel.min.js"></script>
    <title>Children</title>
</head>
<body>
<div id="react-container"></div>
  <script type="text/babel">

    const { Children } = React
    const { render } = ReactDOM

    const Display = ({ ifTruthy=true, children }) =>
        (ifTruthy) ?
            Children.only(children) :
            null

    const age = 22

    render(
        <Display ifTruthy={age >= 21}>
            <h1>You can enter</h1>
        </Display>,
        document.getElementById('react-container')
    )

  </script>
</body>
</html>
